<?php

//测试模拟消息发送
// $GLOBALS["HTTP_RAW_POST_DATA"] = '<xml>
// 								<ToUserName><![CDATA[toUser]]></ToUserName>
//  								<FromUserName><![CDATA[fromUser]]></FromUserName>
//  								<CreateTime>1348831860</CreateTime>
//  								<MsgType><![CDATA[text]]></MsgType>
//  								<Content><![CDATA[动漫：哈哈]]></Content>
//  								<MsgId>1234567890123456</MsgId>
//  								</xml>';
// $GLOBALS["HTTP_RAW_POST_DATA"] = '<xml>
// <ToUserName><![CDATA[toUser]]></ToUserName>
// <FromUserName><![CDATA[FromUser]]></FromUserName>
// <CreateTime>123456789</CreateTime>
// <MsgType><![CDATA[event]]></MsgType>
// <Event><![CDATA[subscribe]]></Event>
// </xml>';


if (isset($_GET['echostr'])) {
	// 验证接口 只需运行一次
	include 'controller/Api.php';
	
	$api = new Api('weixin');
	$api -> valid();
} else {
	include 'controller/Respose.php';
	include 'controller/GetAccessToken.php';

	$dealInfo = new Respose();
	$dealInfo -> responseMsg();
}



